const mongoose = require("mongoose");

mongoose.connect("127.0.0.1:9293");

const db = mongoose.connection;

db.on("error", console.error.bind(console, "连接数据库失败"));

db.once("open", () => {
  console.log("连接数据库成功");
});
module.exports = mongoose;
